<div class="todo <?php echo $todo->tag_classes ?>" id="todo<?php echo $todo->id ?>">
  <div class="ui-widget-header ui-helper-reset ui-corner-all ui-state-default">
    <span class="title"><?php echo $todo ?></span>
    <?php if (0 < count($todo->Tags)): ?>
      <ul class="tags">
        <?php foreach ($todo->Tags as $tag): ?>
          <li class="<?php echo $tag->slug ?>"><?php echo $tag ?></li>
        <?php endforeach ?>
      </ul>
      <?php endif ?>
      <?php if (isset($include_dashboard_links) && true === $include_dashboard_links): ?>
        <span class="check"></span>
      <?php endif ?>
    <span class="ui-widget-header-end"></span>
  </div>
  <div class="ui-widget-content ui-helper-reset ui-corner-bottom">
    <?php if (isset($include_dashboard_links) && true === $include_dashboard_links): ?>
      <p class="permalink">
        <?php echo link_to(
          'permalink',
          'todo_permalink',
          $todo,
          array(
            'title' => url_for(array('sf_route' => 'todo_permalink', 'sf_subject' => $todo), true)
          )
        ) ?>
      </p>
    <?php endif ?>
    <?php echo $todo->get('content_html', ESC_RAW) ?>
    <?php if (isset($include_dashboard_links) && true === $include_dashboard_links): ?>
      <p class="top"><a href="#todoAnchors"><span class="ui-icon ui-icon-carat-1-n"></span> <span class="txt">top</span></a></p>
    <?php endif ?>
</div>
</div>